'use strict';

var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var merge = require('webpack-merge');
var baseWebpackConfig = require('./webpack.config.base');
var config = require('./config').dev;

module.exports = merge({}, baseWebpackConfig, {
  devtool: '#cheap-module-source-map',
  plugins: [
    new webpack.DefinePlugin({
      'NODE_ENV': JSON.stringify('development'),
      '__DEV__': true
    }),
    new webpack.NoEmitOnErrorsPlugin(),
    new HtmlWebpackPlugin({
      template: path.join(__dirname, 'index.tpl.vm'),
      config: config.template,
    }),
  ],
})
